<#include "/admin/_inc/_head.html"/>
<#include "/admin/_inc/_layout.html" />
<!DOCTYPE html>
<html lang="en">

<head>
    <@head />
    <link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/assets/js/plugins/zTree/v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .mfs-selected-option {
            border: 1px #ccc solid;
            display: inline-block;
            width: 100%;
            font-size: 14px;
            height: 31px;
            line-height: 2.42857;
            padding-left: 4px;
        }

        .mfs-options {
            position: absolute;
            border: 1px #ccc solid;
            /* border-top:0px; */
            width: 100%;
            margin: 0;
            padding: 0px;
            color: #333;
            overflow: auto;
            min-height: 100px;
            max-height: 300px;
            background: #ffffff;
            z-index: 9;
            margin-top: -6px;
        }
    </style>
</head>

<body>
    <@layout>
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">

                    <div class="ibox-content">
                        <form id="form" action="<#if model?exists>${ctx_admin}/category/update<#else>${ctx_admin}/category/add</#if>" method="post" class="form form-horizontal" >

                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    上级栏目
                                </label>
                                <div class="col-sm-8">
                                    <input type="hidden" name="categoryId" value="${model.categoryId}">
                                    <input type="hidden" id="siteId" value="${model.siteId}">
                                    <input type="text" id="categoryPId" name="categoryPId" placeholder="" readonly="readonly" value="${model.categoryPId?default('')}" class="form-control" required=""
                                           aria-required="true" >
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    栏目名称
                                </label>
                                <div class="col-sm-8">
                                    <input minlength="2" type="text" class="form-control" placeholder="" name="categoryName" required=""
                                           aria-required="true" value="${model.categoryName}">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    是否显示
                                </label>
                                <div class="col-sm-8">
                                    <label class="radio-inline radio i-checks">
                                        <input type="radio" name="showModes" value="1" <#if model.showModes==1> checked="checked" </#if>
                                               id="showModes1">
                                        显示
                                    </label>
                                    <label class="radio-inline i-checks">
                                        <input type="radio" name="showModes" value="0" <#if model.showModes==0> checked="checked" </#if>
                                               id="showModes0">
                                        隐藏
                                    </label>
                                </div>
                            </div>


                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    排序
                                </label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" placeholder="" required="" aria-required="true"
                                           name="categoryOrder" value="${model.categoryOrder}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">
                                    关键字
                                </label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" placeholder="" required="" aria-required="true"
                                           name="keywords" value="${model.keywords}">
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">描述说明</label>
                                <div class="col-sm-8">
                                    <textarea name="description" cols="" rows="" class="form-control" placeholder="说点什么...100个字符以内" >${model.description}</textarea>
                                </div>
                            </div>


                            <div class="form-group">
                                <div class="col-sm-4 col-sm-offset-3 text-center">
                                    <button id="btn-submit" class="btn btn-primary" type="submit">提交</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>

            </div>

        </div>


    </@layout>

<script src="/assets/js/plugins/iCheck/icheck.min.js"></script>
<script src="/assets/js/plugins/validate/jquery.validate.min.js"></script>
<script src="/assets/js/plugins/validate/messages_zh.min.js"></script>
<script src="/assets/js/plugins/jquery.form/jquery.form.js"></script>
<script type="text/javascript" src="/assets/js/plugins/zTree/v3/js/jquery.ztree.all-3.5.js"></script>
<script type="text/javascript" src="/assets/js/droptree.js"></script>
<script type="text/javascript" src="/assets/js/cms/category/category_edit.js"></script>
</body>

</html>